//
//  ZWJNetworkManager.h
//  Free
//
//  Created by 张炜健 on 2018/4/28.
//  Copyright © 2018年 张炜健. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "FilesHeader.h"
@interface ZWJNetworkManager : YTKRequest

typedef void(^successBlock)(NSDictionary *dic);
typedef void(^block)(id error);

//网络请求
+(void)requestWithRequestData:(NSDictionary *)requestData WithUrl:(NSString *)url WithWithCompletionBlockWithSuccess:(successBlock)success failure:(block)failure;

//上传图片
+(void)uloadImage:(UIImage *)image WithWithCompletionBlockWithSuccess:(successBlock)success failure:(block)failure;

//用法
//UIImage *img = [UIImage imageNamed:@"friend"];
//[ZWJNetworkManager uloadImage:img WithWithCompletionBlockWithSuccess:^(NSDictionary *dic) {
//    if ([dic[Code] intValue] == 200) {
//        NSLog(@"上传成功-%@",dic[Response][@"showUrl"]);
//
//    }else{
//        [self showWithTitle:dic[Response]];
//    }
//} failure:^(id error) {
//    NSLog(@"%@",error);
//}];


@end
